#!/bin/bash
:<< !
runing environment:
	1. need install gradle environment, version:5.2.1
	2. install java envrionment, version 1.8
	3. android sdk envrioment, android sdk8, android sdk9, you could install android studio, then install messed sdk
	
notice:
	1. integrated cases need gradle build success, command like: gradlew build, no error,failed message

python script call this bat format like:
	gradleRunJavaAllCase.sh /home/test/java_workspace/okhttp_test_project ./logfile.txt ./applog.txt

all command like below:
	gradle test
	
bat script params:
	1. workspace: where the test project stored
	2. logFile: execute test log stored to this file
	3. appLogFile: be tested soft's log stored to this file

return:
    0: execute normally
    1: execute unnormally

!


echo show $1,$2,$3
workspace=$1
logFile=$2
appLogFile=$3
echo change workspace to $workspace
cd $workspace
gradle test > $logFile 2>&1

echo shell exit with status $?
exit $?